<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="../../../fanghuanweiran/trunk/js/theme/default/style.css" type="text/css"/>
    <script src="../../../jpp/jquery/jquery-1.7.min.js"></script>
    <script src="../../../jpp/openlayers/openlayers-2.11.min.js"></script>
    <script src="../../../jpp/socket.io/io-0.8.7.min.js"></script>
    <script src="../../../jpp/require/require-1.0.1.min.js"></script>
    <script src="../trunk/WeTextIcon.js"></script>
    <script src="../trunk/WeTextMarker.js"></script>
    <script src="../trunk/Lang/en.js"></script>
    <script src="../trunk/Lang/zh-CN.js"></script>
    <script type="text/javascript">
        var map, layer;
        function init(){
            OpenLayers.ImgPath = '../../../fanghuanweiran/trunk/js/theme/default/img/';
            map = new OpenLayers.Map( 'map', {
                projection: new OpenLayers.Projection("EPSG:900913"),
                displayProjection: new OpenLayers.Projection("EPSG:4326"),
                units: "m",
                maxResolution: 156543.0339,
                maxExtent: new OpenLayers.Bounds(-20037509, -20037508.34, 20037508.34, 20037508.34)
            });
            map.addLayer(new OpenLayers.Layer.OSM());
            map.addControl(new OpenLayers.Control.LayerSwitcher());
            map.addControl(new OpenLayers.Control.MousePosition());
            map.setCenter(new OpenLayers.LonLat(122.3699, 37.4105).transform(
                map.displayProjection,
                map.projection
            ), 8);
            //
            layer = new OpenLayers.Layer.Markers();
            map.addLayer(layer);
            
            for (var i=0; i<5; i++) {
                layer.addMarker(
                    new OpenLayers.WeTextMarker(
                        new OpenLayers.LonLat(
                            122.3699 + Math.random(),
                            37.4109 + Math.random()
                        ).transform(
                            map.displayProjection,
                            map.projection
                        ),
                        new OpenLayers.WeTextIcon("<a href='http://www.baidu.com/'>hyperlinkhyperlinkhypdafsafakfaljdkfjaslkfaldskfafjkdsfjajferlink</a>")
                    )
                )
            }
        }
    </script>
  </head>
  <body onload="init()">
    <div id="map" style="height:300px; width: 1000px;"></div>
  </body>
</html>
